﻿using System;
using System.Collections.Generic;
using System.Text;

namespace FDFtpSync.Core
{
    /*
     * CreatedOn: 2018-05-23
     * CreatedBy: Jackie Lee(天宇遊龍)
     */
    /// <summary>
    /// 客户端配置
    /// </summary>
    public class ClientSyncConfig : SyncConfig
    {
        public IList<ClientPath> ClientPaths { get; set; }

        public int Threads { get; set; }

        public int IntervalSeconds { get; set; }

        public string FileListUrl { get; set; }

        public string FileMd5Url { get; set; }

        public string FtpDownloadUrl { get; set; }

        public string DownloadUrl { get; set; }

        public string FtpUser { get; set; }

        public string FtpPassword { get; set; }

        public bool SyncOwnedModelOnly { get; set; }

        /// <summary>
        /// 只保存服务端目录结构
        /// </summary>
        public bool SyncServerOnly { get; set; }

        /// <summary>
        /// 使用的下载器类型
        /// </summary>
        public SyncServerType SyncServerType { get; set; }
    }

    public class ClientPath
    {
        public string ServerName { get; set; }

        public string Path { get; set; }

    }

    /// <summary>
    /// 使用的下载器
    /// </summary>
    public enum SyncServerType
    {
        Http = 0,
        Ftp
    }
}
